package com.alibaba.aone.casestudy.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.alibaba.aone.casestudy.common.entity.FailureTime;
import com.alibaba.aone.casestudy.dao.FailureTimeDao;

/**
 * 类IbatisFailureTimeDao.java的实现描述：TODO 类实现描述 
 * @author yongchun.chengyc 2011-4-26 下午10:41:44
 */
public class IbatisFailureTimeDao extends SqlMapClientDaoSupport implements FailureTimeDao {

	public List<FailureTime> getFailureTimeByFailureNumber(String failureNumber) {
		
		return getSqlMapClientTemplate().queryForList("FAILURETIME.getFailureTimeByFailureNumber",failureNumber);
	}

	public void addFailureTime(FailureTime failureTime) {
		getSqlMapClientTemplate().insert("FAILURETIME.addFailureTime",failureTime);
		
	}

	public void update(FailureTime failureTime) {
		getSqlMapClientTemplate().update("FAILURETIME.updateFailureTime",failureTime);
		
	}

	public void delete(String number) {
		getSqlMapClientTemplate().delete("FAILURETIME.deleteFailureTime");
		
	}

	
}
